<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta name="author" content="wangzhichao">
	<title>选择油品</title>
	<script language="javascript" src="../script/common.js" type="text/javascript"></script>
	<script language="javascript" type="text/javascript">
	var qt = {};								//数据表格对象
	var isShow;									//申请单id
	function load(){
		isShow=getPara("isShow");
		if(isShow == "true"){
			$("nameSpan").innerHTML = "<label>商品名称</label>";
		}else{
			$("nameSpan").innerHTML = "<label>商品大类名称</label>";
		}
		createTable();
	}
	function createTable(){
		var xml="";
	  	var columns = [];
			columns[0]= {type:"radio"};
			if(isShow == "true"){
				xml = "sel_gift_list";
			}else{
				xml = "sel_goodsCategory_list";
			}
		qt = new QueryTable(xml,"searchForm","datalist",columns,{showData:true});
	}
	//显示数据
	function showData(){	
		qt.showTable();				
	}
	function onSave() {
		var obj = qt.getRadioValue(true);
		if(obj==null||!obj){
			showWarning("请选择一种类型名称");return;
		}
		dialogBackValue(obj);
	}
	</script>
</head>
	
<body onload="load()">
	<div id="listview">
		<div class="searchForm">
			<form id="searchForm" name="searchForm">
				<table cellSpacing=0 cellPadding=6 width="100%" border=0>
					<tr>
						<td><span id="nameSpan"></span>&nbsp;<input type="text" name="name"></td>
						<td><button type="button" onclick="showData()">查   询</button></td>
					</tr>
				</table>
			</form>
		</div>	
		<div id="datalist"></div>
	</div>		
</body>
</html>